#include <iostream>
using namespace std;

int SumSqure(int a,int b)
{
    return a*a+b*b;
}

float SumSqure(float a,float b)
{
    return a*a+b*b;
}

long SumSqure(long a,long b)
{
    return a*a+b*b;
}

int main()
{
    int a,b;
    cin>>a>>b;
    cout<<SumSqure(a,b)<<endl;
    float c,d;
    cin>>c>>d;
    cout<<SumSqure(c,d)<<endl;
    long e,f;
    cin>>e>>f;
    cout<<SumSqure(e,f)<<endl;

    return 0;
}
